package com.project.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.project.bean.GradeBean;
import com.project.bean.RoleBean;
import com.project.bean.UserBean;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface IRoleMapper extends BaseMapper<RoleBean> {
    public List<GradeBean> findByRoleIdArray(@Param("roleIdArray") Integer[] roleIdArray);

    public List<RoleBean> findRoleListByUserId(Integer userId);

    public void delRole(Integer roleId);

    public RoleBean findByRoleId(Integer roleId);

    public void updateGrade(@Param("roleId") Integer roleId, @Param("newGradeIdArray") Integer[] newGradeIdArray);

    public void delByUser(Integer userId);
}
